﻿<%@ Page Language="C#" AutoEventWireup="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">


    <title>修改文件</title>
            <link rel="stylesheet" href="../../js/easyui/themes/default/easyui.css" />
            <link rel="stylesheet" href="../../js/easyui/themes/icon.css" /> 
            <link rel="stylesheet" href="../../js/easyui/demo/demo.css" />  
            <script type="text/javascript" src="../../js/easyui/jquery.min.js"></script>  
            <script type="text/javascript" src="../../js/easyui/jquery.easyui.min.js"></script>
            
    
</head>
<body>
<%
    string sql = "";
    db.DbHelper dbx = new db.DbHelper();
    
    sql = "select * from help where helpid=" + Request["helpId"];
    System.Data.DataTable dt = dbx.RunQuery(sql);
    if (dt == null || dt.Rows.Count <= 0)
    {
        Response.Write("无数据，不能修改！");
        Response.End();
    }
%>
    <div id="div_edit" style="width:330px;height:430px;padding:0px">  
        <form id="fmedit" method="post" action="fileDoEdit.aspx">  
            <div class="fitem" style="display:none">  
                <label>帮助文件的编号 :</label>  
                <input name="helpId" class="easyui-validatebox"  value="<%=dt.Rows[0]["helpId"] %>">  
            </div>  
            <div class="fitem">  
                <label>帮助文件的名称:</label>
                <input name="helpName" class="easyui-validatebox" value="<%=dt.Rows[0]["helpName"]%>" required="true"  style="width: 150" >  
            </div>  
            <br/>
            <div class="fitem">  
                <label>帮助文件的类型:</label>  
                <select id="helpType" name="helpType" style="width: 138px">
                              <option value="1" selected>类别1</option>
                              <option value="2">类别2</option>
                              <option value="3">类别3</option>
                              <option value="4">类别4</option>
                              <option value="5">类别5</option>
                             
                  </select>
            </div>  
            <br/>
            <%--<div class="fitem">  
                <label>法规的令号:</label>  
                <input name="lingNum" class="easyui-numberbox" style="width: 150" min="1"   value="<%=dt.Rows[0]["lingNum"] %>">  
            </div> 
            <br/> 
            <div class="fitem">  
                <label>法规的部号:</label>  
                <input name="buNum" class="easyui-numberbox" style="width: 150" min="1"   value="<%=dt.Rows[0]["buNum"] %>">  
            </div>  
            <br/>
            <div class="fitem">  
                <label>法规发布者:</label>  
                <input name="fgIssueBy" class="easyui-validatebox"  style="width: 150"  value="<%=dt.Rows[0]["fgIssueBy"]%>">  
            </div> 
            <br/>           
            <div class="fitem">  
                <label>发布的日期:</label>  
                <input class="easyui-datebox"  name="fgIssueDate"  style="width: 150" value="<%=dt.Rows[0]["fgIssueDate"]%>">
            </div>
            <br/>  --%>
            <div class="fitem">  
                <label>文件上传者:</label>  
                <select name="helpUploadBy" style="width: 138px">
                  <option value="1" selected>管理员</option>
                </select>
            </div> 
            <br/> 
            <div class="fitem">  
                <label>上传的日期:</label>  
                <input class="easyui-datebox"  name="helpUploadDate"  style="width: 150" value="<%=dt.Rows[0]["helpUploadDate"]%>"> 
            </div>
            <br/> 
            <div class="fitem">  
                <label>文件的路径:</label>  
                <input  class="easyui-validatebox" style="width:150" name="helpUrl"  id="helpUrl" required="true" value="<%=dt.Rows[0]["helpUrl"]%>" />
                <br />
                <iframe
                    src="upFile.aspx" style="height:50px; width: 150" frameborder="0"
                    marginheight="0" marginwidth="0" frameborder="0" scrolling="no" id="I1" 
                    name="I1"></iframe>
            </div>
            <div id="dlgedit-buttons" style="padding-top:0px">  
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveFile()">保存</a>  
                <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="window.parent.$('#dlgedit').dialog('close');">取消</a>  
            </div> 
        </form>  

    </div>
 
</body>
</html>
<script type="text/javascript">

    function saveFile() {
        if ($('#fmedit').form('validate')) {
            $('#fmedit').submit();
        }
    }

</script>
